package es.ucm.fdi.isbc.viviendas.predicados_de_filtrado;

import jcolibri.exception.NoApplicableFilterPredicateException;
import jcolibri.method.retrieve.FilterBasedRetrieval.predicates.FilterPredicate;


public class FiltradoExtras implements FilterPredicate {

	@Override
	public boolean compute(Object caseObject, Object queryObject)
			throws NoApplicableFilterPredicateException {
		if((caseObject == null)&&(queryObject==null))
		    return true;
		else if(caseObject == null)
		    return false;
		else if(queryObject == null)
		    return true;
		else{ 
			if((Boolean)queryObject)
				return (Boolean)caseObject;
		return true; 
		}
	}
}
